package cn.itcast.demo1;

public class Cat extends Animal{
    //子类继承父类之后,需要重写父类中所有的抽象方法,不然编译报错
    @Override
    public void eat(){
        System.out.println("猫吃鱼");
    }
    @Override
    public void sleep(){
        System.out.println("猫躺着睡");
    }
}
